﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace QMSDAL
{
    class TestClass
    {
        static void Main(string[] args)
        {
            GCBH user = new GCBH();
            //bool logOrNot = user.Login("HHMADMINMA", "adminma");
            DataSet ds = user.GetAllGCBH();
            Console.WriteLine("namde:{0}", ds.DataSetName);
            foreach (System.Collections.DictionaryEntry item in ds.ExtendedProperties)
            {
                Console.WriteLine("Key = {0}, Value = {1}", item.Key, item.Value);
            }
            Console.WriteLine();
            foreach (DataTable dt in ds.Tables)
            {
                Console.WriteLine("=>{0} Tables:", dt.TableName);

                for (int curCol = 0; curCol < dt.Columns.Count; curCol++)
                {
                    Console.Write(dt.Columns[curCol].ColumnName + "\t");
                }
                Console.WriteLine();
                for (int curRow = 0; curRow < dt.Rows.Count; curRow++)
                {
                    for (int curCol = 0; curCol < dt.Columns.Count; curCol++)
                    {
                        Console.Write(dt.Rows[curRow][curCol].ToString() + "\t");
                    }
                    Console.WriteLine();
                }
            }
            //Console.WriteLine("Login:{0}", logOrNot.ToString());
            Console.Read();
        }
    }
}
